import LocalCache from '@/utils/cache'

// 根据id获取按钮配置信息
export const getButtonInfoById =(id:string, pageEname:string) => {
    const pageInfo = LocalCache.getCache('page')
    return pageInfo?.btnsObj[`${pageEname}:${id}`] || null
}
// 根据id获取按钮配apiUrl信息
export const getButtonApiUrlById =(id:string, pageEname:string) => {
    const pageInfo = LocalCache.getCache('page')
    const apiStr =  pageInfo?.btnsObj[`${pageEname}:${id}`]?.apiUrl
    return apiStr &&apiStr.trim()
}